// https://pub.dev/documentation/rxdart/latest/

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import 'rx_dart_conception_page.dart';
import 'rx_dart_demo_page.dart';

class RxDartPage extends StatefulWidget {
  final Map<String, dynamic> arguments;
  RxDartPage({Key key, this.arguments}) : super(key: key);

  @override
  _RxDartPageState createState() => _RxDartPageState();
}

class _RxDartPageState extends State<RxDartPage> with SingleTickerProviderStateMixin {
  TabController _tabController;

  @override
  void initState() {
    super.initState();
    _tabController = TabController(length: 2, vsync: this);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('RxDartPage'),
        bottom: TabBar(
          controller: _tabController,
          tabs: [
            Tab(text: 'Conception'),
            Tab(text: 'Demo'),
          ],
        ),
      ),
      body: TabBarView(
        controller: _tabController,
        children: [
          RxDartConceptionPage(),
          RxDartDemoPage(),
        ],
      ),
    );
  }
}
